package cn.simon.rabbitmq;

import cn.simon.pojo.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @功能描述： 消息队列-生产者-seckill
 * @Auther: simon-yi'an
 */
@Service
@Slf4j
public class MQseckillSend {
    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendSeckillMessage(String message){
        log.info("发送的消息："+message);
        rabbitTemplate.convertAndSend("topicExchange","seckill.simon",message);
    }

}
